package com.cndongtai.dao;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

public class BaseDao {

	@Resource(name="sqlSessionFactory")
	private SqlSessionFactory sqlSessionFactory;
	
	public SqlSession getSqlSession() {
		return sqlSessionFactory.openSession();
	}
	
	public SqlSession getSqlSession(boolean flag) {
		return sqlSessionFactory.openSession(flag);
	}
	
}
